package com.example.shop.fgo.task.upload.controller;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

public class UploadService extends Service {

    UploadThread[] mUploadThreads=new UploadThread[UploadThreadCount.MAX_COUNT];
    public UploadService() {
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        for (int i = 0; i < mUploadThreads.length; i++) {
            if (mUploadThreads[i]==null||!mUploadThreads[i].isAlive()) {

                mUploadThreads[i]=new UploadThread();
                mUploadThreads[i].start();
            }
        }

        return super.onStartCommand(intent, flags, startId);
    }

    @Override
    public IBinder onBind(Intent intent) {
        // TODO: Return the communication channel to the service.
        throw new UnsupportedOperationException("Not yet implemented");
    }
}
